	import {
		createRouter,
		createWebHashHistory
	} from 'vue-router'
	import qingjiashenpi from '@/views/qingjiashenpi/list'
	import qingjiashenqing from '@/views/qingjiashenqing/list'
	import jieguotongzhi from '@/views/jieguotongzhi/list'
	import xuesheng from '@/views/xuesheng/list'
	import xueshengRegister from '@/views/xuesheng/register'
	import xueshengCenter from '@/views/xuesheng/center'
	import banji from '@/views/banji/list'
	import gonggao from '@/views/gonggao/list'
	import liuyan from '@/views/liuyan/list'
	import laoshi from '@/views/laoshi/list'

export const routes = [{
		path: '/login',
		name: 'login',
		component: () => import('../views/login.vue')
	},{
		path: '/',
		name: '首页',
		component: () => import('../views/index'),
		children: [{
			path: '/',
			name: '首页',
			component: () => import('../views/HomeView.vue'),
			meta: {
				affix: true
			}
		}, {
			path: '/updatepassword',
			name: '修改密码',
			component: () => import('../views/updatepassword.vue')
		}
		
		,{
			path: '/xueshengCenter',
			name: '学生个人中心',
			component: xueshengCenter
		}
		,{
			path: '/qingjiashenpi',
			name: '请假审批',
			component: qingjiashenpi
		}
		,{
			path: '/qingjiashenqing',
			name: '请假申请',
			component: qingjiashenqing
		}
		,{
			path: '/jieguotongzhi',
			name: '结果通知',
			component: jieguotongzhi
		}
		,{
			path: '/xuesheng',
			name: '学生',
			component: xuesheng
		}
		,{
			path: '/gonggao',
			name: '公告',
			component: gonggao
		}
		,{
			path: '/liuyan',
			name: 'liuyan',
			component: () => import('@/views/liuyan/list.vue'),
			meta: {
				title: '留言管理'
			}
		}
		,{
			path: '/liuyan-student-list',
			name: 'liuyan-student-list',
			component: () => import('@/views/liuyan/student-list.vue'),
			meta: {
				title: '老师给我的留言'
			}
		}
		,{
			path: '/liuyan-student-form',
			name: 'liuyan-student-form',
			component: () => import('@/views/liuyan/student-form.vue'),
			meta: {
				title: '给老师留言'
			}
		}
		,{
			path: '/liuyan-teacher-list',
			name: 'liuyan-teacher-list',
			component: () => import('@/views/liuyan/teacher-list.vue'),
			meta: {
				title: '学生给我的留言'
			}
		}
		,{
			path: '/liuyan-teacher-form',
			name: 'liuyan-teacher-form',
			component: () => import('@/views/liuyan/teacher-form.vue'),
			meta: {
				title: '给学生留言'
			}
		}
		,{
			path: '/banji',
			name: '班级',
			component: banji
		}
		,{
			path: '/laoshi',
			name: '教师',
			component: laoshi
		}
		,{
			path: '/qingjiashenqing-statistics',
			name: 'qingjiashenqing-statistics',
			component: () => import('@/views/qingjiashenqing/statistics.vue'),
			meta: {
				title: '请假申请统计'
			}
		},
		{
			path: '/qingjiashenpi-statistics',
			name: 'qingjiashenpi-statistics',
			component: () => import('@/views/qingjiashenpi/statistics.vue'),
			meta: {
				title: '请假审批统计'
			}
		},
		{
			path: '/ai-chat',
			name: 'ai-chat',
			component: () => import('@/views/ai-chat/index.vue'),
			meta: {
				title: 'AI助手'
			}
		}
		]
	},
	{
		path: '/xueshengRegister',
		name: '学生注册',
		component: xueshengRegister
	}
]

const router = createRouter({
	history: createWebHashHistory(process.env.BASE_URL),
	routes
})

export default router
